<?php
namespace backend\models;
use Yii;
use yii\db\ActiveRecord;

class Goods extends ActiveRecord
{

    public static function tableName()
    {
        return '{{%goods}}';
    }
     public static function getData($offset,$limit){

        $data=self::find()->limit($limit)->offset($offset)->asArray()->all();
        return $data;
     }
     public static function Addone($data){
        $result=Goods::save($data);
        return $result;
     }
}